class Campsite < ActiveRecord::Base
  belongs_to :greatwalk
  belongs_to :fee
  has_many :bookings
  
  validates_presence_of :camp_location, :capacity, :max_stay, :walk_id, :fees_id
  validates_uniqueness_of :camp_location
  
  def self.find_whose_walks_id_is(camp_id)
    find(:all, :conditions => ['walk_id = ?', camp_id])
  end
end
